package com.dekaru.util;


public class Pair {
    
    private double x;
    private double y;
    
    
    
    public Pair() {
        
        x = 0.0;
        y = 0.0;
    }
    
    public Pair(double x, double y) {
        
        this.x = x;
        this.y = y;
    }
    
    public Pair(Pair pair) {
        
        this.x = pair.getX();
        this.y = pair.getY();
    }
    
    

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }
    
    
    
    public boolean equalX(Pair p) {
        
        return (p.getX() == this.getX());
    }
    
    public boolean equalY(Pair p) {
        
        return (p.getY() == this.getY());
    }
    
    public boolean equals(Pair p) {
        
        return (p.getX() == this.getX() && p.getY() == this.getY());
    }
    
    public String toString() {
        
        return "(" + x + "," + y + ")";
    }
}